import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;


public class RegristMail
{
    private static final int len = 10;
    private static String[] letters = {
        "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"
    };
    
    public static void main(String[] args)
    {
        for (int i = 0; i < 10; i++)
        {
            write(getRadomStr() + "\n");
        }
    }
    
    private static void write(String str)
    {
        try
        {
            FileWriter fw = new FileWriter("randomEmail.txt", true);
            fw.write(str);
            fw.close();
        }
        catch (IOException e)
        {
        }
    }
    
    private static String getRadomStr()
    {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < len; i++)
        {
            Random random = new Random();
            sb.append(letters[Math.abs(random.nextInt()%letters.length)]);
        }
        return sb.toString();
    }
    
    
}
